﻿<div class="container-fluid">
    <style>
        .height700 {
            height: 700px;
            min-height: 700px;
            overflow: paged-y-controls;
        }
    </style>
    <div class="row">
        <div class="row">
            <h2 class="col-md-5">网站主配置</h2>
            <button type="button" class="btn btn-success btn-lg col-md-1 pull-right waves-effect" ng-click="save()">保存</button>
        </div>
        <div class="input-group">
            <span class="input-group-addon">网站主域名：</span>
            <div class="fg-line">
                <input type="text" class="form-control" ng-model="Settings.Domain" />
            </div>
        </div>
        <div class="input-group">
            <span class="input-group-addon">网站标语：</span>
            <div class="fg-line">
                <input type="text" class="form-control" ng-model="Settings.Brand" />
            </div>
        </div>
        <div class="input-group">
            <span class="input-group-addon">网站口号：</span>
            <div class="fg-line">
                <input type="text" class="form-control" ng-model="Settings.Slogan" />
            </div>
        </div>
        <div class="input-group">
            <span class="input-group-addon">保留关键字：</span>
            <div class="fg-line">
                <input type="text" class="form-control" ng-model="Settings.ReservedName" />
            </div>
        </div>
        <div class="input-group">
            <span class="input-group-addon">上传图片水印：</span>
            <div class="fg-line">
                <input type="text" class="form-control" ng-model="Settings.Watermark" placeholder="留空则上传图片时不添加水印" />
            </div>
        </div>
        <div class="form-inline">
            <div class="input-group">
                <span class="input-group-addon el-switch" style="text-align: left">
                    <span>闭站保护：</span>
                    <input type="checkbox" name="switch" ng-checked="Settings.CloseSite=='true'">
                    <span class="el-switch-style" ng-click="CloseSite()"></span>
                </span>
            </div>
            <div class="input-group">
                <span class="input-group-addon el-switch" style="text-align: left">
                    <span>数据写保护：</span>
                    <input type="checkbox" name="switch" ng-checked="Settings.DataReadonly=='true'">
                    <span class="el-switch-style" ng-click="DataReadonly()"></span>
                </span>
            </div>
            <div class="input-group">
                <span class="input-group-addon el-switch" style="text-align: left">
                    <span>启用网站打赏功能：</span>
                    <input type="checkbox" name="switch" ng-checked="Settings.EnableDonate=='true'">
                    <span class="el-switch-style" ng-click="EnableDonate()"></span>
                </span>
            </div>
            <div class="input-group">
                <span class="input-group-addon el-switch" style="text-align: left">
                    <span>允许RSS订阅：</span>
                    <input type="checkbox" name="switch" ng-checked="Settings.EnableRss=='true'">
                    <span class="el-switch-style" ng-click="EnableRss()"></span>
                </span>
            </div>
        </div>
        <div class="input-group">
            <span class="input-group-addon">资源管理器根目录：</span>
            <div class="fg-line">
                <input type="text" class="form-control" ng-model="Settings.PathRoot" placeholder="请输入合法的路径，如果是网站根目录则输入反斜线“/”" />
            </div>
            <span class="input-group-btn">
                <button type="button" class="btn btn-info" ng-click="pathtest()">检查路径</button>
            </span>
        </div>
        <div class="input-group">
            <span class="input-group-addon">文件上传目录：</span>
            <div class="fg-line">
                <input type="text" class="form-control" ng-model="Settings.UploadPath" placeholder="/upload" />
            </div>
        </div>
    </div>
    <div class="row">
        <h3>自定义脚本和样式</h3>
                <h4>css样式代码：</h4>
            <div class="fg-line">
                <textarea class="form-control" rows="10" style="width: 100%" ng-model="Settings.Styles" placeholder="将在网站head标签中追加css样式标签代码"></textarea>
            </div>
                <h4>js脚本代码：</h4>
            <div class="fg-line">
                <textarea class="form-control" rows="10" style="width: 100%" ng-model="Settings.Scripts" placeholder="将在网站页脚后追加js脚本标签代码"></textarea>
            </div>
    </div>
    <div class="row">
        <h2>网站SEO相关</h2>
        <div class="input-group">
            <span class="input-group-addon">标题：</span>
            <div class="fg-line">
                <input type="text" class="form-control" ng-model="Settings.Title" />
            </div>
        </div>
        <div class="input-group">
            <span class="input-group-addon">关键词：</span>
            <div class="fg-line">
                <input type="text" class="form-control" ng-model="Settings.Keyword" />
            </div>
        </div>
        <div class="input-group">
            <span class="input-group-addon">描述：</span>
            <div class="fg-line">
                <input type="text" class="form-control" ng-model="Settings.Description" />
            </div>
        </div>
    </div>
    <div class="row">
        <h2>网站邮箱配置</h2>
        <div class="input-group">
            <span class="input-group-addon">发件邮箱：</span>
            <div class="fg-line">
                <input type="text" class="form-control" ng-model="Settings.EmailFrom" />
            </div>
        </div>
        <div class="input-group">
            <span class="input-group-addon">发件邮箱密码：</span>
            <div class="fg-line">
                <input type="password" class="form-control" ng-model="Settings.EmailPwd" />
            </div>
        </div>
        <div class="input-group">
            <span class="input-group-addon">发件邮箱SMTP服务器：</span>
            <div class="fg-line">
                <input type="text" class="form-control" ng-model="Settings.SMTP" />
            </div>
        </div>
        <div class="input-group">
            <span class="input-group-addon">发件邮箱SMTP端口号：</span>
            <div class="fg-line">
                <input type="text" class="form-control" ng-model="Settings.SmtpPort" />
            </div>
        </div>
        <div class="input-group">
            <span class="input-group-addon el-switch" style="text-align: left">
                <span>启用SSL：</span>
                <input type="checkbox" name="switch" ng-checked="Settings.EnableSsl=='true'">
                <span class="el-switch-style" ng-click="EmailEnableSsl()"></span>
            </span>
        </div>
        <div class="input-group">
            <span class="input-group-addon">接收网站通知邮箱：</span>
            <div class="fg-line">
                <input type="text" class="form-control" ng-model="Settings.ReceiveEmail" />
            </div>
            <span class="input-group-btn">
                <button type="button" class="btn btn-info" ng-click="mailtest()">测试邮箱配置</button>
            </span>
        </div>
    </div>
    <div class="row">
        <h2>网站媒体设置</h2>
        <div class="col-md-2 col-sm-3 col-xs-4">
            <h3>
                网站logo：
            </h3>
            <img class="img img-responsive img-thumbnail img-rounded" ng-src="{{Settings.logo}}" style="max-height: 300px;" ng-click="setImage('logo')" />
            <span class="input-group-btn">
                <button type="button" class="btn btn-danger waves-effect" ng-click="setImage('logo')">修改</button>
            </span>
        </div>
        <div class="col-md-5">
            <h3>文章版权声明：</h3>
            <div style="height: 200px;" class="ueditor" ng-model="Settings.Disclaimer" type="text/plain"></div>
        </div>
        <div class="col-md-5">
            <h3>网站页脚版权：</h3>
            <div style="height: 120px;" class="ueditor" ng-model="Settings.Copyright" type="text/plain"></div>
        </div>
    </div>
</div>
<div style="position: absolute;left: -20000px">
    <form id="setImageForm" onsubmit="return false" enctype="multipart/form-data">
        <div class="file-box">
            <div class="input-group">
                <span class="input-group-addon">上传图片：</span>
                <div class="fg-line">
                    <input type="text" name="file0" disabled class="form-control" placeholder="请选择一张图片" />
                </div>
                <span class="input-group-btn hidden">
                    <a href="javascript:void(0);" class="btn btn-info ">浏览</a>
                </span>
                <input type="file" class="uploadFile" name="file" onchange="getFile(this, 'file0')" />
            </div>
            <div class="m-l-15 m-b-10">
                <button type="button" class="btn btn-primary" ng-click="uploadImage()"> 上传 </button>
            </div>
        </div>
    </form>
</div>